﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using Shop.Data.Business;
using Shop.Data.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shop.Data.Test.Business
{
    [TestClass]
   public class ProductoBusinessTest
    {
       
       [TestMethod]
       public void TestGetListByFilter()
       {

           var lista = ProductoBusiness.GetListByFilter("");
           Assert.IsTrue(lista.Count > 0);
       }
        [TestMethod]
       public void TestCreate()
       {
           Producto Productos = new Producto
           {
               nombre = "Tv",
               descripcion = "De 26Pulg ",
               stock = "25",
               

           };
           Producto p = ProductoBusiness.Create(Productos);
           Assert.IsTrue(p.Id != Guid.Empty);
       }

        [TestMethod]
        public void TestUpdate()
        {
            Producto Productos = new Producto
            {
                Id = new Guid("26fbf9aa-9ae7-e411-827a-74d02bc102fb"),
                nombre = "Radio",
                descripcion = "FM and AM",
                stock = "25",


            };
            Producto p = ProductoBusiness.Update(Productos);
            Assert.IsTrue(p.Id != Guid.Empty);
        }
    }
}
